﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using QLCHBANGIAY.DATA;

namespace QLCHBANGIAY.BUSINESS
{
    public class ProductServices
    {

        private static ProductControler db = new ProductControler();

        #region[Product_GetById]
        public static List<Product> Product_GetById(string Id)
        {
            return db.Product_GetById(Id);
        }
        #endregion
      //  #region[Product_GetById1]
        //public static Product Product_GetById1(string Id)
        //{
        //    return db.Product_GetById1(Id);
        //}
        //#endregion
        //#region[Product_GetByCatelogy]
        //public static List<Data.Product> Product_GetByCatelogy(string Id)
        //{
        //    return db.Product_GetByCatelogy(Id);
        //}
        //#endregion
        #region[Product_GetByTop]
        public static List<Product> Product_GetByTop(string Top, string Where, string Order)
        {
            return db.Product_GetByTop(Top, Where, Order);
        }
        #endregion
        public static List<Product> Product_timkiem(string key)
        {
            return db.Product_timkiem(key);
        }
        #region[Product_GetByIndex]
        //public static List<Product> Product_GetByIndex(string Index, string Lang)
        //{
        //    List<Product> list = new List<Product>();
        //    list = Product_GetByAll();
        //    return list.FindAll(delegate(Product obj)
        //    {
        //        return obj.Active == "1" && obj.Index == Index;
        //    });
        //}
        #endregion
        #region[Product_GetByAll]
        public static List<Product> Product_GetByAll()
        {
            return db.Product_GetByAll();
        }
        #endregion
        #region[Product_Paging]
        public static List<Product> Product_Paging(string CurentPage, string PageSize, string Where, string Order)
        {
            return db.Product_Paging(CurentPage, PageSize, Where, Order);
        }
        #endregion
        #region[Product_Insert]
        public static bool Product_Insert(Product data)
        {
            return db.Product_Insert(data);
        }
        #endregion
        #region[Product_Update]
        public static bool Product_Update(Product data)
        {
            return db.Product_Update(data);
        }
        #endregion
        //#region[Product_Update_Ord]
        //public static bool Product_Update_Ord(string order, string price, string id)
        //{
        //    return db.Product_Update_Ord(order, price, id);
        //}
        //#endregion
        #region[Product_Delete]
        public static bool Product_Delete(string Id)
        {
            return db.Product_Delete(Id);
        }
        #endregion
        #region[Product_Update_Order]
        public static bool Product_Update_order(string order, string id)
        {
            return db.Product_Update_Order(order, id);
        }
        #endregion


    }
}